package com.lancoo.ccas53.pojo.constant;

/**
 * @Author: liufeng
 * @CreateTime: 2024-07-12  16:15
 * @Description:
 */
public enum ScheduleState {
    NORMAL(1, "已排（正常）"),
    CONFLICT(3, "已排（冲突）"),
    UNARRANGE(4, "待排");

    private int code;
    private String msg;

    ScheduleState(int code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    public int getCode() {
        return code;
    }

    public String getMsg() {
        return msg;
    }

    public static ScheduleState getByCode(int code) {
        for (ScheduleState value : ScheduleState.values()) {
            if (value.getCode() == code) {
                return value;
            }
        }
        return null;
    }
}
